package com.jing.cloud.client.zookeeper;

import com.google.common.collect.Maps;
import com.jing.cloud.service.ServiceInfo;

import java.util.Map;

public class Node {
    private String key;
    private String version;
    private String path;
    private ServiceInfo info;
    private Map<String, Node> nodes = Maps.newConcurrentMap();

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Map<String, Node> getNodes() {
        return nodes;
    }

    public void setNodes(Map<String, Node> nodes) {
        this.nodes = nodes;
    }


    public String getVersion() {
        return version;
    }


    public void setVersion(String version) {
        this.version = version;
    }


    public ServiceInfo getInfo() {
        return info;
    }


    public void setInfo(ServiceInfo info) {
        this.info = info;
    }

    @Override
    public String toString() {
        return "Node [keyColumn=" + key + ", versionColumn=" + version + ", path=" + path + ", info=" + info + ", nodes="
                + nodes + "]";
    }


    public String getPath() {
        return path;
    }


    public void setPath(String path) {
        this.path = path;
    }
}
